<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateQhQuestionLibrariesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qh_question_libraries', function (Blueprint $table) {
            $table->id();
            $table->string('name')->comment('题库名称');
            $table->text('description')->nullable()->comment('说明');
            $table->text('notice')->nullable()->comment('通知');
            $table->string('province')->nullable()->comment('省份');
            $table->decimal('amount')->nullable()->default(0)->comment('金额');
            $table->string('bgColor', 64)->nullable()->comment('背景色');
            $table->string('color', 64)->nullable()->comment('字体色');
            $table->integer('questionCount')->nullable()->default(0)->comment('试题数量');
            $table->longText('components')->nullable()->comment('组件');
            $table->integer('sort')->nullable()->default(0)->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qh_question_libraries');
    }
}
